class Box:
    def __init__(self, length, width, height):
        self.length = length
        self.width = width
        self.height = height
    def volume(self):
        vol = self.length * self.width * self.height
        print(f"立方体体积为: {vol}")
        return vol

    def surface_area(self):
        area = 2 * (self.length * self.width + self.length * self.height + self.width * self.height)
        print(f"立方体表面积为: {area}")
        return area
# if __name__ == "__main__":
#     my_box = Box(3, 4, 5)  # 创建立方体实例，长3、宽4、高5
#     my_box.volume()  # 输出体积
#     my_box.surface_area()  # 输出表面积